import java.util.Random;

public class demo06 {
    public static void main(String[] args) {
        Random r = new Random();
        //获取1-500内的随机数
        int n = r.nextInt(1, 501);
        //定义一个sum来接收偶数和
        int sum = 0;
        for (int i = 0; i <= n; i++) {
            if (i % 2 == 0) {
                sum += i;
            }
        }
        System.out.println(sum);
    }
}
